local Class = require('lua.lang.Class')

--- @class RuntimeException : Class
--- @field message string
local RuntimeException = Class {}

--- @param message string
--- @return RuntimeException
function RuntimeException:new(message)
	--- @type RuntimeException
	local o = {}
	o.message = message
	return setmetatable(o, RuntimeException)
end

--- @return void
function RuntimeException:throw()
	error(self.message)
end

return RuntimeException